import socket


maya_sock = socket.socket(socket.AddressFamily.AF_INET, socket.SocketKind.SOCK_STREAM)

maya_sock.connect(("127.0.0.1", 62333))

plugin_name = "custom_deformer_skin.mll"

maya_cmd = f"import maya.cmds as cmds\n\
if not cmds.pluginInfo('{plugin_name}', query=True, loaded=True):\n\tcmds.loadPlugin('{plugin_name}')"

maya_sock.send(maya_cmd.encode())

maya_sock.close()